package com.li.mapper;

import com.github.pagehelper.Page;
import com.li.pojo.Host;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: zhiqingLi
 * @Description:
 * @Date: Created in 20:49 2024/3/13
 **/
@Mapper
public interface HostMapper {

    //查询全部 加上模糊查询
    Page<Host> showList(@Param("name") String name, @Param("id") Integer id);

    //添加
    void addSubregion(Host host);

    //修改回显数据
    @Select("select * from host where id = #{id};")
    Host updGetById(Long id);

    //修改数据
    void updSubregion(Host host);

    //删除
    void delById(Long id);

    @Select("select * from host where host_name like '%${name}%' ;")
    List<Host> showNameByHostName(String name);
}
